package com.feng.chat.service;

import com.feng.chat.dto.Result;
import com.feng.chat.entity.TalkRecords;
import com.baomidou.mybatisplus.extension.service.IService;
import com.feng.chat.vo.MessageForwardVO;
import com.feng.chat.vo.TalkCreateVO;
import com.feng.chat.vo.TextVO;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 用户聊天记录表 服务类
 * </p>
 *
 * @author dyf
 * @since 2022-05-31
 */
public interface ITalkRecordsService extends IService<TalkRecords> {

    //获取会话的信息列表
    public TalkRecords getLastMessage(Integer talkType, Integer uid, Integer rid);

    //清除未读消息
    public Result unreadClear(Integer userId, Integer receiver_id, Integer talk_type);

    //获取聊天消息
    public Result records(Integer receiver_id,Integer record_id,  Integer talk_type, Integer limit, Integer userId);

    //发送文本消息
    public Result text(TextVO textVO, Integer userId);

    //消息撤回
    public Result revoke(Integer record_id);

    //消息删除
    public Result delete(Integer receiver_id,Integer record_id,Integer talk_type,Integer userId);

    //消息转发
    public Result forward(MessageForwardVO messageForwardVO,Integer userId);

    //获取会话消息详情
    public Result recordsForward(Integer record_id,Integer userId);

    //获取聊天历史记录
    public Result recordsHistory(Integer uid, Integer talk_type, Integer receiver_id, Integer record_id, Integer msg_type, Integer limit);
}
